class CS2C_SyncServerTime:
	static var proto_id : int = 0x9001
	static var proto_name: String = "CS2C_SyncServerTime"

	# 消息字段
	var nServerStartTime: int
	var nCurFrame: int

	func _init():
		nServerStartTime = 0
		nCurFrame = 0

	func to_bytes():
		var buff = StreamPeerBuffer.new()
		buff.put_u64(nServerStartTime)
		buff.put_u64(nCurFrame)
		return buff.data_array

	func from_bytes(packet: PackedByteArray, offset: int):
		var buff = StreamPeerBuffer.new()
		buff.data_array = packet
		buff.seek(offset)
		nServerStartTime = buff.get_u64()
		nCurFrame = buff.get_u64()
	
	func _to_string() -> String:
		return "nServerStartTime = %d, nCurFrame = %d" % [nServerStartTime, nCurFrame]
